import Vue from 'vue'
import App from './App.vue'
import router from './router'
//*引入插件
import TreeTable from 'vue-table-with-tree-grid'
import './plugins/element.js'
//*使用全局样式文件
import './assets/css/globo.css'
//*导入富文本编辑器
import VueQuillEditor from 'vue-quill-editor'
//*注册插件
Vue.component('tree-table',TreeTable)
Vue.config.productionTip = false

//*富文本编辑器样式
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'

Vue.use(VueQuillEditor)
//*全局过滤器过滤时间
Vue.filter('dateFormate', function (originVal) {
  const dt = new Date(originVal)
  const y = dt.getFullYear()
  //*月数不足两位  ，前面补零
  const m = (dt.getMonth()+1+'').padStart(2,'0')
  const d = (dt.getDay()+'').padStart(2,'0')

  const hh = (dt.getHours()+'').padStart(2,'0')
  const mm = (dt.getMinutes()+'').padStart(2,'0')
  const ss = (dt.getSeconds() + '').padStart(2, '0')
  return `${y}-${m}-${d} ${hh}:${mm}:${ss}`
})

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
